﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Entity;

namespace BIZ
{
    public class Menu_l3BIZ
    {
        Menu_l3DAL DAL = new Menu_l3DAL();

        //---------------------Menu_l3SearchById-----------------------------
        public List<objMenu_l3> Menu_l3SearchById(int id)
        {
            try
            {
                List<objMenu_l3> lst = new List<objMenu_l3>();
                lst = DAL.Menu_l3SearchById(id);

                return lst;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l3SearchById_l2-----------------------------
        public List<objMenu_l3> Menu_l3SearchById_l2(int id_l2)
        {
            try
            {
                List<objMenu_l3> lst = new List<objMenu_l3>();
                lst = DAL.Menu_l3SearchById_l2(id_l2);

                return lst;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l3Insert-----------------------------
        public int Menu_l3Insert(int id_l2, string name, int position)
        {
            try
            {
                int i = DAL.Menu_l3Insert(id_l2, name, position);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l3Update-----------------------------
        public int Menu_l3Update(int id, int id_l2, string name, int position)
        {
            try
            {
                int i = DAL.Menu_l3Update(id, id_l2, name, position);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l3Delete-----------------------------
        public int Menu_l3Delete(int id)
        {
            try
            {
                int i = DAL.Menu_l3Delete(id);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
